﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure;

namespace AzureToolkit.Engine {
    public class MessageHandlerSettings {


        public string QueueName { get; set; }
        public int MaxRetries { get; set; }
        public int MaxThreads { get; set; }
        public int BatchSize { get; set; }
        public TimeSpan VisibilityTimeout { get; set; }
        public TimeSpan IntervalBetweenRuns { get; set; }
        public CloudStorageAccount Account { get; set; }

        internal Type CommandType { get; set; }

        internal MessageHandlerSettings(CloudEngineSettings settings) {
            this.MaxRetries = 0;
            this.MaxThreads = 1;
            this.BatchSize = 32;
            this.VisibilityTimeout = TimeSpan.FromMinutes(1);
            this.IntervalBetweenRuns = TimeSpan.FromSeconds(30);
            this.Account = settings.Account;
        }

    }
}
